/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package ar.edu.utn.frsf.cidisi.upcolbpip.collaborativebusinessprocesses.impl;

import ar.edu.utn.frsf.cidisi.upcolbpip.collaborativebusinessprocesses.CollaborativebusinessprocessesPackage;
import ar.edu.utn.frsf.cidisi.upcolbpip.collaborativebusinessprocesses.ExceptionPoint;
import ar.edu.utn.frsf.cidisi.upcolbpip.collaborativebusinessprocesses.ExceptionProcess;

import java.util.Collection;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.util.EObjectResolvingEList;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Exception Process</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link ar.edu.utn.frsf.cidisi.upcolbpip.collaborativebusinessprocesses.impl.ExceptionProcessImpl#getExceptionPointCondition <em>Exception Point Condition</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ExceptionProcessImpl extends CollaborativeBusinessProcessImpl implements ExceptionProcess {
	/**
	 * The cached value of the '{@link #getExceptionPointCondition() <em>Exception Point Condition</em>}' reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExceptionPointCondition()
	 * @generated
	 * @ordered
	 */
	protected EList<ExceptionPoint> exceptionPointCondition;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ExceptionProcessImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return CollaborativebusinessprocessesPackage.Literals.EXCEPTION_PROCESS;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<ExceptionPoint> getExceptionPointCondition() {
		if (exceptionPointCondition == null) {
			exceptionPointCondition = new EObjectResolvingEList<ExceptionPoint>(ExceptionPoint.class, this, CollaborativebusinessprocessesPackage.EXCEPTION_PROCESS__EXCEPTION_POINT_CONDITION);
		}
		return exceptionPointCondition;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case CollaborativebusinessprocessesPackage.EXCEPTION_PROCESS__EXCEPTION_POINT_CONDITION:
				return getExceptionPointCondition();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case CollaborativebusinessprocessesPackage.EXCEPTION_PROCESS__EXCEPTION_POINT_CONDITION:
				getExceptionPointCondition().clear();
				getExceptionPointCondition().addAll((Collection<? extends ExceptionPoint>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case CollaborativebusinessprocessesPackage.EXCEPTION_PROCESS__EXCEPTION_POINT_CONDITION:
				getExceptionPointCondition().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case CollaborativebusinessprocessesPackage.EXCEPTION_PROCESS__EXCEPTION_POINT_CONDITION:
				return exceptionPointCondition != null && !exceptionPointCondition.isEmpty();
		}
		return super.eIsSet(featureID);
	}

} //ExceptionProcessImpl
